{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 第三章 组合数据结构练习"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 3.1组合数据结构概述\n",
    "#### 3.2 序列类型\n",
    "+ 字符串"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a=\"西安建筑科技大学\"\n",
    "for i in range(len(a)):\n",
    "  print(a[i])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a=\"西安建筑科技大学\"\n",
    "for i in range(len(a)):\n",
    "  for j in range(i):\n",
    "      print(a[j],end=\"\")\n",
    "  print() "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "contrl=8\n",
    "blank=int((contrl*2+1)/2)\n",
    "li=\"\"\n",
    "for i in range(contrl):\n",
    "    for j in range(blank-i):\n",
    "       print(\" \",end=\"\") \n",
    "    \n",
    "    for j in range(i*2+1):\n",
    "       print(\"*\",end=\"\")\n",
    "    print(\"\")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "例题 输入一个数n，求解∑nk=1k!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
